]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lookingGlass: Fix newline replacing
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 11 Sep 2013 04:38:38 +0000 (00:38 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 11 Sep 2013 19:02:32 +0000 (15:02 -0400)
text.replace() returns the new string as strings in JS are immutable.

js/ui/lookingGlass.js

index 268d45f5773e0aa8d764210a6c65bf42451f6b95..a408628a0138c41788ddbc6295395a7fc60f5dcb 100644 (file)
@@ -920,7 +920,7 @@ const LookingGlass = new Lang.Class({
             let text = o.get_text();
             // Ensure we don't get newlines in the command; the history file is
             // newline-separated.
-            text.replace('\n', ' ');
+            text = text.replace('\n', ' ');
             // Strip leading and trailing whitespace
             text = text.replace(/^\s+/g, '').replace(/\s+$/g, '');
             if (text == '')